<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="order by dede58.com"/>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="assets/img/favicon.png" type="image/x-icon">

    <!-- Stylesheets -->
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/responsive.css">
<script src="js/jquery.min.1.8.2.js" type="text/javascript"></script>
<script src="js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script src="js/common_js.js" type="text/javascript"></script>
<script src="js/jquery.foucs.js" type="text/javascript"></script>
<script src="assets/js/vue.js"></script>
<title>修改地址</title>
</head>

<body>
<!--顶部样式-->
<!-- <div class="top_header">
<em class="left_img"></em>
<div class="header clearfix" id="header">
<a href="#" class="logo_img"><img src="images/logo.png" /></a>
<div class="header_Section">
 <div class="shortcut">
  <ul>
   <li  class="hd_menu_tit"><em class="login_img"></em><a href="#">登录</a></li>
   <li  class="hd_menu_tit"><em  class="registered_img"></em><a href="#">注册</a></li>
   <li  class="hd_menu_tit"><em class="Collect_img"></em><a href="#">收藏夹</a></li>
   <li  class="hd_menu_tit"><em class="cart_img"></em><a href="#">购物车（0）</a></li>
   <li  class="hd_menu_tit list_name" data-addclass="hd_menu_hover"><a href="#">网站导航</a><em class="navigation_img"></em>
     
    <div class="hd_menu_list">
     <span class="wire"></span>
		   <ul>
		    <li><a href="#">常见问题</a></li>
			<li><a href="#">在线退换货</a></li>
		    <li><a href="#">在线投诉</a></li>
			<li><a href="#">配送范围</a></li>
		   </ul>
		</div>	
   </li>
  </ul>
 </div>
 <div class="nav" id="Navigation">
  <ul class="Navigation_name"> 
   <li class=""><a herf="#">首页</a></li>
   <li class=""><a herf="#">所有果蔬</a></li>
   <li class=""><a herf="#">活动专区</a></li>
   <li class=""><a herf="#">水果馆</a></li>
   <li class=""><a herf="#">素菜馆</a></li>
   <li class=""><a herf="#">会员中心</a></li>
   <li class=""><a herf="#">联系我们</a></li>
  </ul>
 </div>
 <script>$("#Navigation").slide({titCell:".Navigation_name li"});</script>
</div>
</div>
<em class="right_img"></em>
</div> -->
<div id="body">
<header class="main-header">
            <div class="container">
                <div class="header-inner">
                    <div class="logo">
                        <a href="index.html"><img src="assets/img/logo.png" alt="Main Logo"></a>
                    </div>
                    
                    <div class="categories">
                        <button><i class="flaticon-list"></i>
                            <span>商品分类</span></button>
                        <ul>
                            <li v-for="(classify,i) in classifyList"><a :href="'shop.html?id='+classify.id" ><i class="flaticon-chicken-hand-drawn-outline"></i> {{classify.classifyName}}</a></li>
                            <!-- <li><a href="shop.html"><i class="flaticon-chicken-hand-drawn-outline"></i> 家禽</a></li>
                            <li><a href="shop.html"><i class="flaticon-pressure-washer"></i> 粗粮</a></li>
                            <li><a href="shop.html"><i class="flaticon-pest"></i> Pest Control</a></li>
                            <li><a href="shop.html"><i class="flaticon-stationery"></i> Office Products</a></li>
                            <li><a href="shop.html"><i class="flaticon-make-up"></i> Beauty Products</a></li>
                            <li><a href="shop.html"><i class="flaticon-first-aid-kit"></i> Health Products</a></li>
                            <li><a href="shop.html"><i class="flaticon-track"></i>水产</a></li>
                            <li><a href="shop.html"><i class="flaticon-sketch"></i> 手工艺品</a></li>
                             <li><a href="shop.html"><i class="flaticon-baby-boy"></i> Baby Care</a></li> -->
                        </ul>
                    </div>
                    
                    <form action="#" class="menu-search">
                        <!-- <select name="select-category">
                            <option value="option-1">All Categories</option>
                            <option value="option-2">Fruits and Vegetables</option>
                            <option value="option-3">Meat and Fish</option>
                            <option value="option-4">Home and Cleaning</option>
                            <option value="option-5">Pest Control</option>
                            <option value="option-6">Office Products</option>
                            <option value="option-7">Beauty Products</option>
                            <option value="option-8">Health Products</option>
                            <option value="option-9">Pet Care</option>
                            <option value="option-10">Home Appliances</option>
                            <option value="option-11">Baby Care</option>
                        </select> -->
                        <input type="search"  required>
                        <button type="submit" style="width: 150px;">搜索</button>
                    </form>
                    
                    <div class="menu-collections">
                        <!-- <div class="collection-item watch">
                            <i class="flaticon-heart"></i>
                            <div class="collection-inner">
                                <div class="alert single-collection">
                                    <button data-dismiss="alert"><i class="flaticon-delete-button"></i></button>
                                    <div class="collection-image">
                                        <img src="assets/img/shop/cart-1.png" alt="">
                                    </div>
                                    <div class="collection-content">
                                        <p>Danish Full Cream Milk</p>
                                        <h6>$120.00</h6>
                                    </div>
                                </div>
                                <div class="alert single-collection">
                                    <button data-dismiss="alert"><i class="flaticon-delete-button"></i></button>
                                    <div class="collection-image">
                                        <img src="assets/img/shop/cart-2.png" alt="">
                                    </div>
                                    <div class="collection-content">
                                        <p>Healthy Yellow Papaya</p>
                                        <h6>$120.00</h6>
                                    </div>
                                </div>
                                <div class="collection-btn">
                                    <a href="cart.html" class="theme-btn bg-blue no-shadow mx-auto">Add to Cart</a>
                                </div>
                            </div>
                        </div> -->
                        <!-- <div class="collection-item cart">
                            <i class="flaticon-shopping-cart"></i>
                            <div class="collection-inner">
                                <div class="alert single-collection">
                                    <button data-dismiss="alert"><i class="flaticon-delete-button"></i></button>
                                    <div class="collection-image">
                                        <img src="assets/img/shop/cart-1.png" alt="">
                                    </div>
                                    <div class="collection-content">
                                        <p>Danish Full Cream Milk</p>
                                        <h6>$120.00</h6>
                                    </div>
                                </div>
                                <div class="alert single-collection">
                                    <button data-dismiss="alert"><i class="flaticon-delete-button"></i></button>
                                    <div class="collection-image">
                                        <img src="assets/img/shop/cart-2.png" alt="">
                                    </div>
                                    <div class="collection-content">
                                        <p>Healthy Yellow Papaya</p>
                                        <h6>$120.00</h6>
                                    </div>
                                </div>
                                <div class="collection-btn">
                                    <a href="cart.html" class="theme-btn bg-blue no-shadow mr-10">View Cart</a>
                                    <a href="checkout.html" class="theme-btn ml-auto no-shadow">Checkout</a>
                                </div>
                            </div>
                        </div> -->
                        <div class="collection-item profile">
                            <i class="flaticon-user-1"></i>
                            <div class="collection-inner">
                                <ul>
                                    <li><a href="cart.html">购物车</a></li>
                                    <li><a href="user.html">用户中心</a></li>
                                    <li v-if="islogin"><a href="sign-in.html">登录</a></li>
                                    <!-- <li><a href="sign-up.html">Sign Up</a></li> -->
                                </ul>
                            </div>
                        </div>
                    </div>
                    
                    <!-- <div class="main-menu">
                        <button><i class="flaticon-list-menu"></i></button>
                        <ul>
                            <li><a href="index.html">Home</a></li>
                            <li class="dropdown"><a href="#">Blog</a>
                                <ul>
                                    <li><a href="blog.html">All Blog</a></li>
                                    <li><a href="blog-details.html">Blog Details</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="#">Shop</a>
                                <ul>
                                    <li><a href="shop.html">Shop Page</a></li>
                                    <li><a href="shop-details.html">Shop Details</a></li>
                                    <li><a href="cart.html">Cart Page</a></li>
                                    <li><a href="checkout.html">Checkout</a></li>
                                </ul>
                            </li>
                            <li class="dropdown"><a href="#">Pages</a>
                                <ul>
                                    <li><a href="sign-in.html">Sign In</a></li>
                                    <li><a href="sign-up.html">Sign Up</a></li>
                                </ul>
                            </li>
                            <li><a href="contact.html">Contact</a></li>
                        </ul>
                        <div class="menu-overlay"></div>
                    </div> -->
                </div>
            </div>
            <div class="collection-close"></div>
        </header>
<!---->
<div><a href="#"><img src="images/AD_page_img_02.png" width="100%"/></a></div>
<!--位置-->
<div class="Bread_crumbs">
 <!-- <div class="Inside_pages clearfix">
   <div class="right Search">
   <form>
    <input name="" type="text"  class="Search_Box"/>
    <input name="" type="button"  name="" class="Search_btn"/>
    </form>
   </div>
 </div> -->
</div>
<!--用户中心(地址管理界面)-->
<div class="Inside_pages clearfix">
 <div class="clearfix user" >
   <!--左侧菜单栏样式-->
     <div class="user_left">
      <div class="user_info">
       <div class="Head_portrait"><img src="images/product_img_17.png"  width="80px" height="80px"/><!--头像区域--></div>
       <div class="user_name">{{user.userName}}</div>
      </div>
      <ul class="Section">
       <!-- <li><a href="#"><em></em><span>我的特色馆</span></a></li> -->
       <li><a href="user_info.html?id=user.id"><em></em><span>个人信息</span></a></li>
       <!-- <li><a href="user_Password.html"><em></em><span>修改密码</span></a></li> -->
       <li><a href="user.html"><em></em><span>我的订单</span></a></li>
       <!-- <li><a href="#"><em></em><span>我的评论</span></a></li>
       <li><a href="#"><em></em><span>我的积分</span></a></li>
       <li><a href="#"><em></em><span>我的收藏</span></a></li> -->
       <li><a href="user_address.html"><em></em><span>收货地址管理</span></a></li>
    </div>
    <!--右侧内容样式-->
    <div class="user_right">
      <div class="user_Borders">
       <div class="title_name">
        <span class="name">地址管理</span>
       </div>
       <div class="about_user_info">
         <form id="form1" name="form1" method="post" action="">   
       <div class="user_layout">
         <ul>
          <li><label class="user_title_name">收件人：</label><input name=""  type="text" :value="addresss.consignee" v-model="addresss.consignee" class="add_text"><em>*</em></li>
          <li><label class="user_title_name">收货地址：</label><input name="" type="text" :value="addresss.address" v-model="addresss.address" class="add_text"><em>*</em></li>
          <li><label class="user_title_name">邮&nbsp;&nbsp;&nbsp;&nbsp;编：</label><input name="" :value="addresss.postalcode" v-model="addresss.postalcode" type="text" class="add_text"><em>*</em></li>
          <li><label class="user_title_name">手&nbsp;机&nbsp;号：</label><input name="" type="text" :value="addresss.phone" v-model="addresss.phone" class="add_text"><em>*</em></li>
         </ul>
         <div class="operating_btn"><input name="name" type="button" @click="update()" value="修改" class="submit—btn"></div>
         </div>
          </form>       
       </div>
       <!--地址列表-->
       <!-- <div class="Address_List">
        <div class="title_name"><span class="name">用户地址列表</span></div>
        <div class="list">
         <table>
         <thead>
          <td class="list_name_title0">收件人姓名</td>
          <td class="list_name_title1">地区</td>
          <td class="list_name_title2">邮编</td>
          <td class="list_name_title3">电话</td>
          <td class="list_name_title4">收货地址</td>
          <td class="list_name_title5">操作</td>
         </thead>        
        
          <tr v-for="add in address">
		  <td>{{add.name}}</td>
		  <td>{{add.code}}</td>
		  <td>{{add.phone}}</td>
		  <td>{{add.address}}</td>
		  <td><a href="">修改</a><a href="#">删除</a></td>
		  </tr>
         </table>
        </div>
       </div> -->
      </div>
   </div>
 </div>
</div>
<!--底部样式-->
<footer class="footer bg-black pt-100 text-lg-left text-center">
            <div class="container">
                <div class="row">

                    <!--Footer Column-->
                    <div class="col-lg-3 col-md-12 mb-30">
                        <div class="footer-widget logo-widget mr-20">
                            <div class="footer-logo">
                                <a href="index.html"><img src="assets/img/logo.png" alt="footer logo"></a>
                            </div>
                            <p>坚持农业农村优先发展，要推动城乡融合发展。破解城乡发展不平衡不协调的矛盾，必须打破城乡二元的制度藩篱，重塑城乡关系，让广大农民平等参与现代化进程。</p>
                           <!-- <div class="footer-social-icon">
                                <ul class="social-style-one">
                                    <li><a href="#"><i class="fa fa-facebook-f"></i></a></li>
                                    <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                                    <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                                    <li><a href="#"><i class="fa fa-instagram"></i></a></li>
                                </ul>
                            </div> -->
                        </div>
                    </div>

                    <!--Footer Column-->
                    <div class="col-lg-2 col-md-3 mb-30">
                        <div class="footer-widget links-widget float-lg-right mr-40">
                            <h5 class="footer-title mb-30">快捷导航</h5>
                            <ul class="list">
                                <li><a href="index.html">主页</a></li>
                                <li><a href="shop.html">商品</a></li>
                                <li><a href="sign-in.html">登录</a></li>
                                <!-- <li><a href="#">CONTACT</a></li> -->
                            </ul>
                        </div>
                    </div>

                    <!--Footer Column-->
                    <div class="col-lg-4 col-md-5 mb-30">
                        <div class="footer-widget form-widget ml-115 mr-30">
                            <h5 class="footer-title mb-30">坚持农业农村优先发展</h5>
                            <p>中央农村工作会议日前在北京举行。会议研究部署了坚持农业农村优先发展的政策措施，是事关脱贫攻坚和乡村振兴的又一次重要会议。明后两年是全面建成小康社会的关键时期，是打赢脱贫攻坚战和实施乡村振兴战略的历史交汇期，做好“三农”工作具有重大意义。会议为做好明后两年“三农”工作确定了基调，为加快实施乡村振兴战略指明了方向，是推进“三农”事业的响鼓重槌。</p>
                            <!-- <form class="subscribe">
                                <input type="email" placeholder="Your Email For Notify" required>
                                <button type="submit">Send</button>
                            </form> -->
                        </div>
                    </div>

                    <!--Footer Column-->
                    <div class="col-lg-3 col-md-4 mb-30">
                        <div class="footer-widget pament-widget">
                            <h5 class="footer-title mb-30">Payment</h5>
                            <ul class="list">
                                <li><a href="#"><img src="assets/img/pay-method/visa.png" alt=""></a></li>
                                <li><a href="#"><img src="assets/img/pay-method/mastercard.png" alt=""></a></li>
                                <li><a href="#"><img src="assets/img/pay-method/discover.png" alt=""></a></li>
                                <li><a href="#"><img src="assets/img/pay-method/americanexpress.png" alt=""></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-12">

                        <!-- Copyright Area-->
                        <div class="copyright text-center pl-10 pr-10 pt-30 pb-10 mt-55 rmt-35 mb-65">
                            <p>Copyright &copy; 2020.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a></p>
                        </div>

                    </div>
                </div>

            </div>
        </footer>
	</div>	
</body>
</html>
<script>
	var getuser=JSON.parse(sessionStorage.getItem('user'));
	var v;
	var p=window.location.href.split("?")[1];
	var paramid;
	if(p!=null&&p.indexOf('id')>=0){
		paramid= window.location.href.split("?")[1].split("=")[1];
	}
	
	new Vue({
		el:'#body',
		data:{
			classifyList:[],
			user:{},
			islogin:true,
			addresss:{},
			id:''
		},
		methods:{
			classfiyLoad:function(){
				$.get('http://192.168.1.19:8080/products/getClassify',function (resp) {
				    
				    var str=resp.data.list;
				    v.classifyList=str;
				    console.log("*******"+v.classifyList)
				});
			},
			isLogin:function(){
				$.get('http://localhost:8082/users/isLogin',function (resp) {
				    v.islogin=resp.data;
				});
			},
			getUser:function(){
				this.user=getuser;
				console.log(this.user);
			},
			getAddress:function(id){
				console.log(id);
				$.get('http://localhost:8082/usersadd/getUseraddByid',{id:id},function(resp){
					console.log("地址返回："+resp.data)
					v.addresss=resp.data;
					console.log(v.addresss);
				})
			},
			getParam:function(){
				if(paramid!=null){
					this.id=paramid;
				}
			},
			update:function(){
				$.get('http://localhost:8082/usersadd/updateUsersadd',v.addresss,function(resp){
					var b=resp.data;
					if(b){
						window.location='user_address.html';
					}
				})
			}
		},
		mounted:function(){
			v=this;
			this.getParam();
			this.classfiyLoad();
			this.getUser();
			this.isLogin();
			this.getAddress(this.id);
		}
	})
</script>
